package cn.com.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import cn.com.domain.Innvoation;

public class InnvoationDao extends HibernateDaoSupport {

	public List<Innvoation> findAllInnvoation() {
		String hql="from Innvoation";
         List<Innvoation> listInnvoation =   this.getHibernateTemplate().find(hql);
		 if(listInnvoation.size()>0)
         return listInnvoation;
		 return null;
	}          

	public void deleteIdInnvoation(Innvoation inn) {
	

	  this.getHibernateTemplate().delete(inn);
	}

	public Innvoation findIdInnvoation(Integer inid) {
	
		return (Innvoation)this.getHibernateTemplate().get(Innvoation.class, inid);
	}


	public void saveInnvaotion(Innvoation innvoation) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().save(innvoation);
	}

	public void updateInnvoation(Innvoation inn) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().update(inn);
	}

		
	}
	


